﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WoWConnecter
{
    public class Realm
    {
        public RealmServerType RealmType { get; private set; }
        public RealmStatus RealmStatus { get; private set; }
        public RealmFlags RealmFlags { get; private set; }
        public string Name { get; private set; }
        public string Address { get; private set; }
        public float Population { get; private set; }
        public byte Characters { get; private set; }
        public byte Language { get; private set; }

        public Realm()
        {

        }

        public Realm(AuthPacketIn packet)
        {
            RealmType = (RealmServerType)packet.ReadByte();
            RealmStatus = (RealmStatus)packet.ReadByte();
            RealmFlags = (RealmFlags)packet.ReadByte();
            Name = packet.ReadCString();
            Address = packet.ReadCString();
            Population = packet.ReadFloat();
            Characters = packet.ReadByte();
            Language = packet.ReadByte();
            packet.ReadByte();
        }
    }
}
